<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
if (request.getParameter("name") != null && request.getParameter("pass") != null)
{
	 response.addCookie(new Cookie ("username", request.getParameter("name")));
	 response.addCookie(new Cookie ("password", request.getParameter("pass")));
	 response.sendRedirect("http://localhost:8080/Entjava/cookieshow.jsp");
} 
	


%> 

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Cookie Sample</title>
</head>
<body>
<form method="POST">
username:&nbsp<input type="text" name="name"/><br/>
password:&nbsp<input type="password" name="pass"/><br/>
<input type="submit" /><br/>
</form>
<br/>


</body>
</html>